package com.admin.socketmultiplayer.activity

import android.content.Context
import android.os.Bundle
import android.support.v7.app.AppCompatActivity

/**
 * Created by 吴昶 on 2018/5/9.
 */
abstract class BaseActivity:AppCompatActivity(){

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        MyApplication.addActivityManager(this)
        setContentView(bindLayout())
        initData()
        initEvent()
    }

    abstract fun bindLayout():Int

    abstract fun initData()

    abstract fun initEvent()

    fun getContext():Context{
        return this
    }
}